widget: more details on gtk_widget_grab_focus docs
authorStefan Kost <ensonic@users.sf.net>
Wed, 1 Sep 2010 12:13:09 +0000 (15:13 +0300)
committerStefan Kost <ensonic@users.sf.net>
Wed, 1 Sep 2010 13:59:00 +0000 (16:59 +0300)
Tell that widget needs to be mapped and realized.

gtk/gtkwidget.c

index d49041553b8e9ba8e085db1272a5508a4937de4c..e2b6e343c16a49777ef1a904a2c86743ffb7f277 100644 (file)
@@ -5163,6 +5163,10 @@ _gtk_widget_grab_notify (GtkWidget *widget,
  *
  * More precisely, it must have the %GTK_CAN_FOCUS flag set. Use
  * gtk_widget_set_can_focus() to modify that flag.
+ *
+ * The widget also needs to be realized and mapped. This is indicated by the
+ * related signals. Grabbing the focus immediately after creating the widget
+ * will likely fail and cause critical warnings.
  **/
 void
 gtk_widget_grab_focus (GtkWidget *widget)